export default [
  {
    path: '/settings',
    component: () => import('@/views/layout/AppLayout.vue'),
    redirect: '/settings/users',
    name: 'Settings',
    meta: {
      title: '系统设置',
      icon: 'setting',
      roles: ['admin', 'dept_head']
    },
    children: [
      {
        path: 'users',
        name: 'UserManagement',
        component: () => import('@/views/settings/UserManagementView.vue'),
        meta: {
          title: '用户管理',
          icon: 'user',
          roles: ['admin']
        }
      },
      {
        path: 'profile',
        name: 'UserProfile',
        component: () => import('@/views/settings/UserProfileView.vue'),
        meta: {
          title: '个人中心',
          icon: 'user',
          // 所有登录用户都可以访问个人中心
          roles: ['admin', 'analyst', 'manager', 'marketing', 'dept_head', 'executive']
        }
      },

      {
        path: 'notification',
        name: 'NotificationCenter',
        component: () => import('@/views/settings/NotificationView.vue'),
        meta: {
          title: '通知中心',
          icon: 'bell',
          roles: ['admin', 'analyst', 'manager', 'marketing', 'dept_head', 'executive']
        }
      },
      {
        path: 'logs',
        name: 'LogsView',
        component: () => import('@/views/settings/LogsView.vue'),
        meta: {
          title: '系统日志',
          icon: 'list',
          roles: ['admin']
        }
      },
      {
        path: 'backup',
        name: 'BackupRestore',
        component: () => import('@/views/settings/BackupRestoreView.vue'),
        meta: {
          title: '备份恢复',
          icon: 'time',
          roles: ['admin']
        }
      },
      {
        path: 'config',
        name: 'SystemConfig',
        component: () => import('@/views/settings/SystemConfigView.vue'),
        meta: {
          title: '系统配置',
          icon: 'tools',
          roles: ['admin']
        }
      }
    ]
  }
] 